package cn.qn.framwork.security;

import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.List;

public class IgnorePathConfig {

    public static List<String> IGNORE_PATH = Arrays.asList(
            "/login"
            , "logout"
            , "/favicon.ico"
    );

    /**
     * TODO 验证无需token的url 和 api接口访问的url(内网ip验证)
     */
    public static boolean ignoreRequest(HttpServletRequest request) {
        String requestUrl = request.getRequestURI();

        return IgnorePathConfig.IGNORE_PATH.contains(requestUrl);
    }
}
